package com.opNaga.bpmp.basicTest;

import com.opNaga.bpmp.connectingObject.sequenceFlow.SequenceFlow;
import com.opNaga.bpmp.flowObject.activity.Task;
import com.opNaga.bpmp.flowObject.event.EndEvent;
import com.opNaga.bpmp.flowObject.event.StartEvent;
import com.opNaga.bpmp.swimlane.Pool;
import org.junit.Assert;
import org.junit.Test;

import java.util.Dictionary;
import java.util.Hashtable;

/**
 * User: Junyi BEI
 * Date: 30/01/2012
 * Time: 13:20
 */
public class SimpleBusinessProcess {
  @Test
  public void businessProcess1() {
    Pool pool = new Pool();
    StartEvent startEvent = new StartEvent();
    Task task = new Task();
    EndEvent endEvent = new EndEvent();
    Assert.assertTrue(pool.addElement(startEvent));
    Assert.assertTrue(pool.addElement(task));
    Assert.assertTrue(pool.addElement(endEvent));
    SequenceFlow sequenceFlow1 = new SequenceFlow();
    Assert.assertTrue(sequenceFlow1.setSource(startEvent));
    Assert.assertTrue(sequenceFlow1.setTarget(task));
    SequenceFlow sequenceFlow2 = new SequenceFlow();
    Assert.assertTrue(sequenceFlow2.setSource(task));
    Assert.assertTrue(sequenceFlow2.setTarget(endEvent));
  }
}
